GetPlatformCanvas
TheGetPlatformCanvas
method returns the drawing structure for the specified graphics system for this canvas.
ODPlatformCanvas GetPlatformCanvas (in ODGraphicsSystem g);
g
- A 16-bit value specifying the graphics system you want to use for this canvas. Valid values for
g
are platform dependent.- return value
- A 32-bit value identifying the graphics-system-specific drawing structure for this canvas. Before using the return value, you must cast it to a valid graphics-system type (such as
GrafPtr
for QuickDraw orgxViewPort
for QuickDraw GX).DISCUSSION
You call this method to get the graphics-system-specific drawing structure (for instance, a window or view port) when you need to draw into a facet.On the Mac OS platform, the graphics system may be either QuickDraw (
kODQuickDraw
) or QuickDraw GX (kODQuickDrawGX
). You must specify the graphics system because, on some platforms, a canvas can have drawing structures for two or more graphics systems simultaneously.If this canvas has a drawing structure for the specified graphics system, this method returns that drawing structure.
On the Mac OS platform, this method generates and returns a drawing structure if the following conditions are all true:
In that situation, this method uses the QuickDraw drawing structure to generate a new QuickDraw GX drawing structure for this canvas.
- QuickDraw GX is installed.
- You specify the QuickDraw GX graphics system.
- This canvas does not have a QuickDraw GX drawing structure, but does have a QuickDraw window drawing structure.
If this canvas does not have and cannot generate a drawing structure for the specified graphics system, this method returns
kODNULL
.EXCEPTIONS
kODErrInvalidGraphicsSystem
- This implementation of OpenDoc does not support the specified graphics system, that graphics system is not installed or available, or this canvas has no drawing structure for that graphics system.
SEE ALSO
TheODGraphicsSystem
type (page 883).
TheODCanvas::HasPlatformCanvas
method (page 74).
TheODCanvas::SetPlatformCanvas
method (page 79).
"The Draw Method of Your Part Editor" on page 158 in OpenDoc Programmer's Guide.
"Issues for All Parts" on page 176 in OpenDoc Programmer's Guide.
For more information on graphics-system-specific drawing structures, see the documentation for your graphics system.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help